module(
    name = "rules_tf",
    version = "0.0.1",
    repo_name = "rules_tf",
    compatibility_level = 1,
)

bazel_dep(name = "rules_license", version = "0.0.7")
bazel_dep(name = "rules_pkg", version = "0.9.1")
bazel_dep(name = "bazel_skylib", version = "1.4.2")
bazel_dep(name = "rules_python", version = "0.24.0")
bazel_dep(name = "platforms", version = "0.0.7")

repos = use_extension("@rules_tf//tf:extensions.bzl", "tf_repositories")

use_repo(
    repos,
    # linux_amd64
    "terraform_linux_amd64",
    "tflint_linux_amd64",
    "tfdoc_linux_amd64",
    "tofu_linux_amd64",
    # linux_arm64
    "terraform_linux_arm64",
    "tflint_linux_arm64",
    "tfdoc_linux_arm64",
    "tofu_linux_arm64",
    # darwin_amd64
    "terraform_darwin_amd64",
    "tflint_darwin_amd64",
    "tfdoc_darwin_amd64",
    "tofu_darwin_amd64",
    # darwin_arm64
    "terraform_darwin_arm64",
    "tflint_darwin_arm64",
    "tfdoc_darwin_arm64",
    "tofu_darwin_arm64",
)

register_toolchains(
    # linux_amd64
    "@rules_tf//:terraform_linux_amd64_toolchain",
    "@rules_tf//:tfdoc_linux_amd64_toolchain",
    "@rules_tf//:tflint_linux_amd64_toolchain",
    "@rules_tf//:tofu_linux_amd64_toolchain",
    # linux_arm64
    "@rules_tf//:terraform_linux_arm64_toolchain",
    "@rules_tf//:tfdoc_linux_arm64_toolchain",
    "@rules_tf//:tflint_linux_arm64_toolchain",
    "@rules_tf//:tofu_linux_arm64_toolchain",
    # darwin_amd64
    "@rules_tf//:terraform_darwin_amd64_toolchain",
    "@rules_tf//:tfdoc_darwin_amd64_toolchain",
    "@rules_tf//:tflint_darwin_amd64_toolchain",
    "@rules_tf//:tofu_darwin_amd64_toolchain",
    # darwin_arm64
    "@rules_tf//:terraform_darwin_arm64_toolchain",
    "@rules_tf//:tfdoc_darwin_arm64_toolchain",
    "@rules_tf//:tflint_darwin_arm64_toolchain",
    "@rules_tf//:tofu_darwin_arm64_toolchain",
)
